package com.cqwshzj.framework.manager;/**
 * @Description:
 * @Auther: Huang Zhijin
 * @Version: 1.0.0
 * @Date: 2021/4/7 11:16
 */

import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.dangdang.ddframe.job.lite.config.LiteJobConfiguration;
import com.dangdang.ddframe.job.lite.spring.api.SpringJobScheduler;

/**
 * 〈〉
 *
 * @author Huang Zhijin
 * @create 2021/4/7
 * @since 1.0.0
 */
public interface ElasticJobManager {

	void addSimpleJob(String jobName,
					  SimpleJob simpleJob,
					  String cron,
					  int shardingTotalCount,
					  String shardingItemParameters );


	SpringJobScheduler createSpringJobScheduler(String jobName,
												SimpleJob simpleJob,
												String cron,
												int shardingTotalCount,
												String shardingItemParameters );


	LiteJobConfiguration getLiteJobConfiguration(String jobName,
								 Class<? extends SimpleJob> jobClass,
								 String cron,
								 int shardingTotalCount,
								 String shardingItemParameters);

	boolean removeZkNodeByJobName(String jobName);
}
